<!DOCTYPE html>
<html>

<head>
    <title>游记列表</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css">
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/travel.css"/>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css">
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/queryAndBlank.js"></script>
    <script>

        $(function () {
            /**
             * 游记监听函数,监听窗口滚动和游记的分页查询,并进行数据渲染
             * function listeningQuery(queryUrl,obj) {}
             * @param1 queryUrl:进行游记分页查询的url
             * @param2 obj:进行数据渲染的jQuery对象
             */
            listeningQuery(baseUrl+'/travels/releasedTravels',$('.travels'));

            /**
             *搜索功能
             */
            $("#searchBtn").click(function () {
                var keyword = $("#searchInp").val()
                if (keyword == null || keyword == "") {
                    $(document).dialog({
                        titleText: '温馨提示',
                        content: '搜索内容不能为空!',
                    });
                } else {

                    window.location.href = "/searchPage.html?keyword=" + keyword + ""
                }

            })
        });

    </script>

</head>

<body>


<div class="search-head">
    <div class="row nav-search">
        <div class="col-1">
            <a href="javascript:history.go(-1);">
                <span><i class="fa fa-chevron-left fa-2x"></i></span>
            </a>
        </div>
        <div class="col-9">
            <div class="input-group-sm search">
                <input id="searchInp" class="form-control" placeholder="搜游记">
            </div>
        </div>
        <div class="col-1">
            <i class="fa fa-search" id="searchBtn"
               style="color:white;font-size:25px;position: absolute;top: 23%;left: 88%">
            </i>
        </div>
    </div>
</div>



<div class="container">

    <h6>每月冠军游记</h6>
    <div id="carouselExampleControls" class="carousel slide" data-ride="carousel">
        <div id="travelsCommends" class="carousel-inner">
            <div ><div class="carousel-item active">
                <div class="border commend">
                    <a  href="travelContent.html?id=8">
                        <img src="/upload/acd22908-8780-4e81-8468-8dac6724b8d1.jpeg" width="100%" height="200px">
                        <h1 > 骨灰级成都吃货地图</h1>
                        <small >成都成都</small>
                    </a>
                </div>
            </div></div>
        </div>

        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
            <span class="sr-only"></span>
        </a>
        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
            <span class="carousel-control-next-icon" aria-hidden="true"></span>
            <span class="sr-only"></span>
        </a>
    </div>
</div>

<div class="container travels">
    <h6>全部游记</h6>
    <div id="allTravels" render-loop="list">
     
        <div class="row detail">
            <div class="col">
                <a render-fun="getHref" render-key="list.id" data-url="/travelContent.html?id=" >
                    <h4 render-html="list.title"></h4>
                </a>
                <p>
                    <a render-fun="getHref" render-key="list.author.id" data-url="/userProfiles.html?id=" >
                        <img class="rounded-circle head-img" render-src="list.author.headImgUrl">
                        <span render-html="list.author.nickName"></span> </a> 在
                    <span class="addr" render-html="list.place.name"></span>

                </p>
                <p>
                    <i class="fa fa-eye fa-fw"></i>
                    <span render-html="list.browseNum">0</span>
                    <i class="fa fa-commenting fa-fw" ></i>
                    <span render-html="list.commentNum"></span>
                </p>
            </div>
            <div class="col bigimg">
                <a render-fun="getHref" render-key="list.id" data-url="/travelContent.html?id=" >
                    <img render-src="list.coverUrl">
                </a>
            </div>
        </div>
    </div>

</div>




</body>

</html>